[3.0] package/win32: build.sh: backport patches to better support UCRT builds
The current 3.0 branch doesn't work well with the latest llvm-ucrt toolchains. Everything has been fixed in 4.0.
When NTDDI is not set the WINVER version in msvcrt is still 0x0502 (Win XP SP1).