Fix return value handling on big-endian architectures

https://rt.cpan.org/Ticket/Display.html?id=89552