Add support for CMake build and Windows platform