added support for MacosX