Fix FreeBSD Support in Agent