agent: Set of fixes missed during merge.

Without these, the FreeBSD port will not compile.
Merge pull request #20 from Semihalf/fix-post-merge

agent: Set of fixes missed during merge.