Deal struck to protect whales from wind turbines