Use a simpler form of expect when it fits.