Corrections to the magnetoresistance formula for semimetals with Dirac electrons: the Boltzmann equation approach validated by the Kubo formula