MINGW still defines _WIN32, so that part seems to be fine. My patch does have one MINGW issue though. Windows uses "MAX_PATH", while *nix usis "PATH_MAX". MINGW takes the *nix approach. I will post an updated patch to address this, after I get an in-house review.
My new patch will be tested against contrib/mingw-cross-compiler.sh before submission.