Handle missing signal.SIGPIPE more generically