Chipmaker Broadcom to buy NetLogic for $3.7 billion