An asymptotic formula for moments of reciprocal values of L-functions