Surface-barrier effects in the microwave second-harmonic response of superconductors in the mixed state