Aussie shares end flat as commodities weigh; NZ slips