fix OS X build issues
Merge pull request #40 from adam2104/osxbuild

fix OS X build issues