Oligarchic growth of giant planets