Dynamical topology change in M theory