Rotation - counter clockwise is +ve and clockwise is -ve
Rx(90)*Rz(-90)*R*Ry(90) will switch in the way you wanted. Either you perform these rotation using quaternions or convert them into DCM (Direction Cosine Matrix) and then perform the rotation and convert back to quaternions.
I hope this will solve your issue.