Achieving sustainable societies: Lessons from modelling the ancient Maya