Merge pull request #3 from michaelld/osx_fixes

OSX fixes