Enable pty/tty functions for BSDs too (initial patch from Xen)