The circuit suggested by Screech is crude as it does not have a threshold nor any hystersis. So you need a Schmitt Trigger between the photo resistor and the transistor.
If you use a LM311, you would not need a transistor since it has adequate internal drive capability.
You also said "I have tried a LM3904 but at 12V that let about 2.3 volts leak through"
It is impossible to comment on this without a circuit to look at. If you post one, I'll be happy to help.
Len