fixed FreeBSD support for pty plugin