On the calculation of the critical temperature from the second virial coefficient