Adding fallback to STDIN when readline is unavailable.