Fix mingw cross compilation being broken by win32/win64 patches.
Differentiate socket closed from socket error in recv_line.