fixed cmake-related compilation issuses for MacOSX
OSX compilation fixes
more fixes to the compilation process. OSX build succeeds & GUI starts