A torque magnetometer for use in superconducting magnets