Does your motherboard have a STR button header? (So that you can push a button and trigger str from a button outside, not inside windows)
if it does, then you just need a timer that will connect the header for a short period of time when the acc line goes off, and reconnect it when it comes back on.
in my searching around, i found this circuit that will do what you want (at least it says it will, i havent built it yet):
instead of connecting it to your power button, you connect it to the STR button header.