ncurses: improved configure switches

I have rewritten the configure switches for based on the Arch Linux ncurses package.

Rebased on master as requested in #262.