network: prevent SIGPIPE on OSX

OSX does not know MSG_NOSIGNAL, and provides its own non-standard
mechanism instead. I guess Apple hates standards.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
