Fix cmake issue on OSX