MacOS fix in CMakeLists.txt