Adapting biodiversity to climate change