Prevent SIGPIPE for Linux/BSD