Patch from Brad Smith to use posix_openpt() instead of