Preliminary support for OSX
Merge pull request #204 from sleeper/osx_support

Preliminary support for OSX