Compile with
./configure LDFLAGS="-Wl,--no-as-needed"
If you need other parameters to the configure scripts, pass them too, e.g.
./configure --enable-httpserv-plugin LDFLAGS="-Wl,--no-as-needed"