Fix build on FreeBSD
Merge pull request #1 from ebfe/freebsd

Fix build on FreeBSD