Optical and photoelectrical properties of the TlGaS2 ternary compound