test-dlopen needs to be added only when libdl is available, and it is like that already (within if HAVE_LIBDL); hence don't unconditionally add it as well.