Fix build for FreeBSD and quash all warnings.
Merge pull request #6 from K6BSD/master

Fix build for FreeBSD and quash all warnings.