Meson: _WIN32_WINNT defined too late
While this patch is still needed for providing baseline for further development (to add stuff to the moved code block), it does not, unlike assumed in the original submission, itself help in searching the functions that depend on Windows version being high enough. The checks ignore global options that we set here.
Meson configure checks set _WIN32_WINNT too late. It's used by the actual build, but not when running checks for availability of the functions. Some functions are only available when _WIN32_WINNT indicates new enough Windows version.