fixed linking errors in CMakeLists