fix cmake build on darwin / mac os x

Tested on a OS X 10.8 in VirtualBox