Final agreement overcomes a dispute about how much power would be given to a proposed UN registry