Add support for OSX
Merge pull request #1 from nitsky/master

Add support for OSX (contributed by nitsky).