MIPS: Make the mips port build cleanly with clang.

Port r13583 (b39b116b) and also fix a couple mips-specific warnings.