make it resistant to potential const correctness fix in Rcpp. related to RcppCore/Rcpp#211