configure.ac: Use LIBS rather than LDFLAGS to add -ldl to dladdr check