Habitat loss causes long extinction transients in small trophic chains