John Hughes, Australian Imperial Forces