fix build on non-x86 64-bit arches

Patch originally by Dan Horák <sharkcz@fedoraproject.org>.