Estimating the asymptotic variance with batch means