Add support for the kFreeBSD backend.
Fix build for FreeBSD systems.