Global patterns in the vulnerability of ecosystems to vegetation shifts due to climate change