Fix CMake build on OS X