Fix build on OSX (and probably FreeBSD).
Merge pull request #3 from DanielO/master

Fix build on OSX (and probably FreeBSD).