UN envoy warns security in Libya 'precarious'