configure: Replace two remaining usages of AC_HAVE_LIBRARY with AC_CHECK_LIB