Symmetry-dependent interfacial reconstruction to compensate polar discontinuity at perovskite oxide interfaces (LaAlO3/SrTiO3 and LaAlO3/CaTiO3)