Structural and magnetic phase transition of sol–gel-synthesized Cr2O3 and MnCr2O4 nanoparticles