Failing to protect the planet from climate change could violate international law, the UN's top court says