Homogenization of problems with gradient constraints