Fixed bug in the conversion functions for big endian platforms.
Reported-by Martin Hundebøll <mhu@es.aau.dk>.