Some fixes for OSX compilation.  Closes #450
Merge pull request #452 from zrax/osx_fix

Some fixes for OSX compilation.  Closes #450