configure: Replace AC_TRY_RUN and AC_TRY_LINK.