Make sure we init Winsock on windows.
BUGFIX: Don't write past the buffer on windows.

When generating the handshake key using _ws_get_random_mask on windows we
would write passed the end of the given buffer, since we simply cast the
buffer as an "unsigned int" pointer. This would result in a write of
sizeof(unsigned int) - sizeof(char) at the end of the buffer, which Visual
Studio caught.