Convert C code to use .Call interface

 - Due to dup=FALSE being deprecated in the .C interface