handle SIGPIPE
fix libuv build