Almost 200 nations kept a global agreement to tackle climate change on track after talks overshadowed by U.S. President Donald Trump's decision to pull out.