Two-photon excitation of mercury atoms by photodissociation of mercury halides