You can always use rb_hash_aref; so remove ifdef and RHASH_TBL.
(RHASH_TBL is faster than rb_hash_aref, but this code doesn't need speed)