FreeBSD 10 fixup

* fixed some compiler errors
* fixed some compiler warnings