The hacks, first reported by the Wall Street Journal, took place in May and were discovered by Google in July.