Google agrees to sell Motorola to Lenovo for $2.9 billion