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

Fix build on FreeBSD