Add initial support for MIPS and fix related issues in configure script

The configure issues are related to a bug in LLVM trunk. Currently, triples have an effect on the output ELF but this should actually depend on the ABI. As a result, the output of config.guess is not usable when running a 32-bit OS on a 64-bit CPU. For now, we are working around this using --host and --build.