Head hundred revives Australia after top-order meltdown