Theory of the Magnetoelectric Effect in Cr2O3