A dynamical systems approach to the overturning of rocking blocks