using size_t instead of int32_t or uint32_t

I've run the tests. It seems to work but in the end I have a weird error (even with just using mongodb/master) : http://uu.zoy.fr/p/LQjoJg#x=5338AHLnVAAVBPMA