agent: FreeBSD compilation enabling fixes