Suspect that the pilot injector is partially clogged leading to the pilot flame not reliably reaching the thermocouple. If you remove the pilot light cover you can see if this is the case.
Your only options are to clean out the jet with a pricker or replace it. It can take a while to clean out all of the carbon deposits using a wire pricker so be patient.
The flame should come into contact with the thermocouple for it to remain on reliably.
Kevin
September 2015