A simple 12v relay should work in theory. Setup so that when voltage is low, the circuit is closed, providing power through the relay, and open when 12v is supplied to the solenoid, cutting power.
I'm sure there is a thread on this. I'll see if I can find it