COP27 climate summit closes with agreement to compensate poor countries