Homogenization of a generalized Stefan Problem in the context of ergodic algebras