Replace if(MSVC) by if(CMAKE_CONFIGURATION_TYPES OR NMAKE)

The latter is used in CMakeLists.txt to handle Debug+Release
builds.