Fix for issue #119: System endiannes and unaligned memory access issues on mips 

Note: This patch only fixes system endianness issues (fix for unaligned memory access issue will be submitted as soon as I'm done with it)