Per #321 use RB_GC_GUARD around rb_hash_dup

Waiting to hear back from @justinweiss and @jeremy to see if this resolves #321.