FindCurses: fix cbreak not being found when ncurses is linked against terminfo

Patch by Mark Wright.

Please don't merge yet, maybe this will be replaced by a properly attributed
patch.

See https://bugs.gentoo.org/show_bug.cgi?id=468622 for more information.
Merge topic 'ncurses-tinfo' into next

43e03e71 FindCurses: fix cbreak not being found when ncurses is linked against terminfo