Fixes for Mac OS X
Merge pull request #22 from catamorphism/master

Fixes for Mac OS X