Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.