fixed bytes conversion when used on 32-bits systems
merged branch fabpot/bytes-conversion-epic-fail (PR #9048)

This PR was merged into the 2.3 branch.

Discussion
----------

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.

Commits
-------

b3ae29d fixed bytes conversion when used on 32-bits systems