PPC fixes

Some fixes for running autotest on ppc 32 bit machines. Original work by Alexander Graf.