Switch from Autotools to CMake

Switch to CMake build.