Add more tests for the presence of dlfcn.h and dlopen