Fix Mac compatibility
Merge pull request #4 from timhall/mac-fixes

Fix Mac compatibility