configure: make use of LIBREPLACE_NETWORK_LIBS instead of redoing the tests