Fossils reveal climate-driven extinctions in ancient New Zealand ecosystem