Fix build on FreeBSD
Merge pull request #1 from gahr/master

Fix build on FreeBSD