Switch to libuv synchronization primitives