Climate-related hazards have killed more than 2 million people in 50 years, said the UN meteorological agency.