tcp: add support for darwin, dragonfly, netbsd and openbsd