Borrow @jjallaire's interrupt code for Rcpp11