agent: Adding MacAddress tests and fixing ksync_init for FreeBSD