Win32 fixes: use CLOSESOCKET to close sockets