Fix portions of CMake for Windows