fix build on big endian arches

Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>