Australia shares end flat as basic materials weigh; NZ closes higher