make cmake work for mac os x