Add CMake and make Windows-compatible