build: fix <ndbm.h> detection in AC_PACKAGE_WANT_GDBM