Fix potential int overflow in due to vague type

This patch fixes the beam package so that the `int` type used isn't vague
(i.e. it is consistently `int64` on all platforms). This is a patch which
makes it easier to port docker to ARM (as this is the only error when
trying to compile docker on my ARMv7 machine). It is a simple patch
which makes no effect on amd64 machines, but is one less thing to fix
on 32-bit machines.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)

/cc @shykes