BUG: Fix string to uint64 conversion on 32-bit platforms.

Fixes #4575.