Fixed compilation for mac
Fixed CMakefile for mac