Maximum sustainable yield and species extinction in ecosystems