Fork for CMake and MinGW-w64 support.