Fixes for the FreeBSD build.