(CMake) Fix compiling under MinGW MSYS