On a model with hysteresis arising in magnetohydrodynamics