Fix some MinGW _WIN32_WINNT-related build issues