M5-brane in three-form flux and multiple M2-branes