Noise-induced dephasing of an ac-driven Josephson junction