avoid the sigpipe on OS X

This causes MongoHub-Mac to crash since the sigpipe is not catched