Optimal phase covariant cloning for qubits and qutrits