Add workaround for detecting the CMake version.