Change the way we detect Visual Studio version

Apparently CMAKE_CXX_COMPILER does not always contain the full
path to the executable.  Instead of relying on that, we will
analyze the value of MSVC_VERSION.