AOL Posts Second-Quarter Profit as Ad Revenue Increases