Switch "tty" implementation to support better compatibility.