Add -m32 flag to the linker to be able to compile for 32bits.