The implementation of the Lock class on Windows currently uses C++ mutexes. That introduces a dependency on the C++ runtime on that platform.
Use a Windows CriticalSection instead of a std::mutex to avoid that dependency.
This works for me with MinGW (tested in a CLANG64 environment of MSYS2).
See also D126291.
This is the first time I'm uploading a patch to Phabricator. So, please let me know if this isn't the right way to propose changes.