Fix input polling in Linux curses build

Should hopefully fix #3948

Will need someone who can reproduce the issue to test if this works.