Add support for Mac OS X.
Merge pull request #47 from jacob-carlborg/osx

Add support for Mac OS X.