Fixes for Mac OS X
Merge pull request #354 from kylelutz/osx-fixes

Fixes for Mac OS X