CMake fix for Mac Os X