pass along flags to libuv build

Closes #6142