Check for ECONNRESET in addition to EPIPE on send().

ECONNRESET appears to be the error code used here on Windows.

Closes #757.
Closes #758.