build: Find libncurses by using pkg-config

Call pkg-config --cflags and pkg-config --libs to find correct CFLAGS
and LDFLAGS respectively.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>