mingw32: <winsock2.h> should be included before <windows.h>

- `<windows.h>` might include `<winsock.h>`
- `<winsock.h>` and `<winsock2.h>` are incompatible. Including `<winsock2.h>` can prevent `<winsock.h>` from being included.

This does not (currently) affect the mingw32 build (though it will generate lots of warnings), but breaks MinGW build.