Fix forkptyrouter plugin compilation on Hurd

While at it add missing linkage to libutil on other platforms
and fix compilation on DragonFlyBSD

Possibly Fix #694