Fix nonblocking connect on Windows

Use the correct value for the call to ioctlsocket() to set the socket to
nonblocking mode and check for WSAWOULDBLOCK return value of connect().