Crossover from incommensurate to commensurate magnetic orderings in CoCr2O4