CMake fixes to enable compilation on Windows using MSVC 2013.