fix R modular typemaps - get_copy is not type aware so multiply with sizeof(type)