FreeBSD 10 fixup

* fixed some compiler errors
* fixed some compiler warnings
Merge pull request #1 from packardb/master

FreeBSD 10 fixup