fix for SIGPIPE AttributeError on Windows