Computation of effective resistivity in materials with microinclusions by a heterogeneous multiscale finite element method