updated (still in use for macosx)
detect MacOSX