Fix generic_statistics on 32-bit platforms. #3496