Added Mac OSX support #2958