FreeBSD compatibility
Merge pull request #1 from echolet/master

FreeBSD compatibility