CMake fix for MinGW