Fixed setting TCP keepalive parameters on Windows

I've never done any C/C++ coding on Windows but this seemed easy enough.
I have tested this and verified with Wireshark that it works as intended.