Free magnetohydrodynamic shear layers in the presence of rotation and magnetic field