Added support for mac osx