Labor's bid to scrap casual rule defeated