Path-integral calculation of the second virial coefficient including intramolecular flexibility effects