Fix compatibility with s390 and s390x architectures

Signed-off-by: Jérémy Bobbio <lunar@zelenka.debian.org>
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Add compatibility with GNU/kFreeBSD

Signed-off-by: Jérémy Bobbio <lunar@debian.org>
Signed-off-by: David Goulet <dgoulet@ev0ke.net>