Fix various errors introduced when renaming variables in main CMakeLists.txt.