Enable building as a subproject

This modifies the library's root CMakeLists.txt file so that it is more
convenient to inlude as a subproject in another build.