Size dependent competition between second harmonic generation and two-photon luminescence observed in gold nanoparticles