Chinese tech company Baidu reported better-than-expected revenue, up by 15% year-on-year in the second quarter.