Add CMAKE_LEGACY_CYGWIN_WIN32 switch to the CMakeLists.txt.