WINDOWS_EXPORT_ALL_SYMBOLS doesn't work with MinGW
We had issue with building mlpack where import library would be almost empty. Investigation led to WINDOWS_EXPORT_ALL_SYMBOLS
which was used with MSVC but did not work with MinGW: https://github.com/msys2/MINGW-packages/issues/6715
Patching CMake to allow using WINDOWS_EXPORT_ALL_SYMBOLS
with MinGW fixed the issue.