OSX support

OSX support implemented. This closes #1