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>
Merge pull request #137 from ignatenkobrain/fix_build_big_endian

fix build on big endian arches