Fix cmake compilation on Mac OS X.