Hostile foreign agencies trying to destabilise country: COAS