Evidence for a different electronic configuration as a primary effect during compression of orthorhombic perovskites: The case of NdM3+ O3 (M=Cr, Ga)