r25978: build: use AC_LIBREPLACE_MDLD_* macros and use the result to build modules