fixes to CMake for Windows