The suggestions for using a timer chip are good ones and probably should work, but Skorpio's original circuit should have worked too, at least in concept. The LM393 can handle a differential voltage up to the power supply voltage, and since the target is a 0 to 12V output I assume the 393 is being powered by a 12V single-ended supply. Under these conditions the 393 should have switched low when the voltage on the non-inverting input dropped below the 2.5V reference, then switched high when it went back above it. The 393 draws very little input current so unless the source is extremely sensitive that shouldn't matter (and it's easy enough to tell - just put a probe on the "+" pin and make sure it is still swinging between it's original values). It's my guess that the part is defective, or that perhaps there are transients in the signal that go outside of the "normal" 1.5 to 9V range that are destroying the part.
Even if you get this to work, however, remember that using the part in this fashion is very likely to lead to chatter on the output unless your input is very clean and monotonic. If there is any noise around the switching threshold the 393 will pass it right through. That's why usually these sorts of comparators have hysteresis features added in to reduce sensitivity to noisy input signals.