Simplify detection of the msvc compiler version.

At the same time support ninja and nmake generators.