FindCurses: Include CheckLibraryExists before using it (#15220)

Include the module at the top unconditionally so that all code paths can
use it.
Merge topic 'FindCurses-include-CheckLibraryExists' into next

f11f9579 FindCurses: Include CheckLibraryExists before using it (#15220)