Use specified types in c99

This fix contains similar fix to #1039. And wide-spread fixes for compatibility.

We should fix to use mrb_int instead of int. But it may be a huge patch. So I didn't fix for now.