added support for macosx