Surge in online ads boosts Yahoo