Changed to use CMake for building. Fixes #7.