Modified CMake files to get MATLAB working on  OSX