Fix CMake code to detect MSVC version.