Use rb_enc_str_new instead of rb_enc_str_new_cstr.

The latter in combination with strndup() would leak large amounts of memory.