added support for Mac OS X