Fix configure script for ncurses without ncursesw

On debian systems it is possible not to have libncursesw5-dev and
still have ncursesw5-config pointing to where it should be,
ncursesw5-config is provided by libncursesw5.