Spin Hall effect in a two-dimensional electron gas in the presence of a magnetic field