Ultrafast insulator-to-metal phase transition as a switch to measure the spectrogram of a supercontinuum light pulse