Switch to CMake for building