Fix OS X build.
Merge pull request #392 from alexrp/osx-fix

Fix OS X build.