add kill mechanism (stolen from minisat-haskell-bindings)