Optical harmonic generation enhanced due to ultrafast intensity fluctuations