Update cmake files to build correctly on Mac OS X.