Support for mips/mipsel

Fix for issue #98

Avoid unaligned memory access on architectures that don't support it.
Fixed endianness related issues.