A model of magnetostriction hysteresis with thermodynamics compatibility