Perrigo to buy Paddock for $540 million