fix readline usage on windows