SERVER-10990: fix types wrt int32_t and size_t comparisons