Global signatures and dynamical origins of the Little Ice Age and Medieval Climate Anomaly.