Fix build on systems where uint64_t != size_t Refs #5849