Amazon to buy MGM studios for $8.45 bn