UN envoy says close to final Libya deal