[ruby] Fix shorten-64-to-32 errors on macOS

Since the extconf.rb pass `-Werror`, the gem won't compile.
diff --git a/lib/rb/ext/struct.c b/lib/rb/ext/struct.c
index 79cbabe..e8255a9 100644
--- a/lib/rb/ext/struct.c
+++ b/lib/rb/ext/struct.c
@@ -225,7 +225,7 @@
 }
 
 static void write_container(int ttype, VALUE field_info, VALUE value, VALUE protocol) {
-  int sz, i;
+  long sz, i;
 
   if (ttype == TTYPE_MAP) {
     VALUE keys;