Replace Autotools build system with CMake