Fixed socket compilation problems on Windows.