Homogenization of some models of hysteresis