Agree. If it's in the junk box, the cost already is sunk. Whatever money or effort it took to get it is gone forever; from this point forward, it is totally free. If nothing else, it solves the problem immediately. Now you can take your time working on a more refined solution if you want to.
The basic opto isolator circuit needs one durrent-limiting resistor and one reverse voltage protection diode on the AC input side, and one pull up (or pull down) resistor on the output transistor side. The output will pulse 60 times per second, and the resistor will dissipate about 1.2 W, so it will have to be rated for at least 2 W; 3-5 W would be much better.
Depending on what device or circuit the opto drives, if you want a continuous output you add a capacitor to the opto output. Where the cap goes can vary. This will slow the response time of the circuit - there will be a delay between when the AC goes away and when whatever the opto is driving gets the message; less than 1 second.
ak