GENEVA - Nearly all countries agreed on Friday to a legally binding framework to curb plastic waste, which has become a major threat to the marine environment, the United Nations said.