support freebsd, like darwin
Merge pull request #41 from kouk/master

support freebsd, like darwin