Fix build on FreeBSD.
Merge pull request #20 from vanillahsu/master

Fix build on FreeBSD.