Nations reach ‘historic’ deal to protect nature