Working on MacOsX
cmake fix for multiplatform.
Fix linux build