Unbreak 9.0 and 9.1 pg_upgrade.

These were broken by my recent backpatch of
the simple prompt fix. These older versions
used DEVTTY, so import the definition from
psql's command.c.