Fix dim for a cell/structure array of S4SXP object

* src/rmatio.c (map_R_object_dims): Removed the usage of LENGTH(elmt) on
    a S4SXP object. Thanks to Prof Brian Ripley who found the issue.