Canada's Saputo has agreed to buy struggling Australian dairy cooperative Murray Goulburn for CAD1.29bn (US$1bn), ending months of speculation over a potential suitor.