Detect MINGW/MSYS/UCRT/CLANG/CYGWIN uname prefixes in build.sh and gmake.mk. Separates building for Windows from running under cmd.exe, so MSYS2 uses mkdir -p/rm -rf instead of falling through to the Linux .so/-ldl path.