Try to fix building the network plugin on FreeBSD
There were two errors; one was an include of a linux-specific header,
the other a forward-declare of a class used in a container that seems to
work with more recent compilers but not the one on CI.