Add freebsd client support

depends on #3983 and kr/pty#12 or kr/pty#14