fixed build on OSX with mysterious CMake option #983