Adding Mac OS X support
Merge branch 'macosx-support'