fixed bytes conversion when used on 32-bits systems

| Q             | A
| ------------- | ---
| Bug fix?      | yes (on 32-bits systems)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8977
| License       | MIT
| Doc PR        | n/a

This PR reverts #7413 and #742, which does not work well when a number is big (3Go for instance) and the machine is 32bits.