pass along CFLAGS/LINK_FLAGS to libuv

Closes #6142
pass optimization flag to the linker