agent: Post-merge fixes for FreeBSD