Fixed errors in cmake build system