Fixed build using CMake > 2.8.9 on OS X