Fix warning casting size_t to int on x86_64