Changes to get sockets working, and warnings removed, on win32