agent: Fixing problem with icmphdr used instead of icmp structure