COPENHAGEN -- President Obama told leaders of 193 nations here Friday that their collective will to address global warming " hangs in the balance " and urged both developed and developing countries to accept a climate change agreement he acknowledged was far from perfect .