The middle Pleistocene transition as a generic bifurcation on a slow manifold