Use FindCurses to find curses libraries

- Some systems have the FindCurses.cmake module to find
  the curses/ncurses libraries using find_package(). And
  in some CheckLibraries is not very reliable, so as
  fallback FindCurses is now used if no other option
  works.