More CMake fixes for OS X.