build: use AC_CHECK_LIB for ncurses, rather than pkg-tool
pkg-tool is indeed an elegant way to check for the presence
of libraries. When using pkg-config to check for ncurses, this
works great... for Linux. Unfortunately, on FreeBSD and MacOS,
ncurses is installed by default, but pkg-config is not. When
pkg-config is installed on these systems, it doesn't know about
the system installed ncurses.
Therefore, somewhat counterintuitively, it is better for portability
to just us AC_CHECK_LIB instead of PKG_CHECK_MODULES to find
ncurses.