MacOS-related changes in CMakeLists