Interaction-induced magnetization of a two-dimensional electron gas