Behavioural plasticity is associated with reduced extinction risk in birds