agent: Preparing code for FreeBSD after changes on linux.

Renaming missed identifiers.
Removing unnedded includes.