Regime changes in ecological systems: an information theory approach