Fixes for Windows compile
Changes to CMake files