Apple patches two zero-day flaws used in targeted attacks