The current package patches `makedefs` to probe for the existance
of the `nsl` and `resolv` libraries but uses the wrong variables
for the prefix, leading to `makedefs` probing the host directories,
not the staging dir ones.
Replace `$PKG_BUILD_DIR` with `$STAGING_DIR` to perform the library
tests in the correct directory.
Fixes the following error spotted by doing test builds against musl
which does not provide a `libnsl`:
.../mips-openwrt-linux-musl/bin/ld: cannot find -lnsl
collect2: error: ld returned 1 exit status
make: *** [master] Error 1
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>