UN reaches agreement with Syria on chemical weapons