Fixed an integer overflow on BSD (rev. 20)

Signed-off-by: nixnodes <code@eth.si>
Latest: 1.9-20

Signed-off-by: nixnodes <code@eth.si>