Fixed compatibility with error 0 sockets.

These errors have been seen on a cygwin like platform running Python
2.3.