Fixed tests on 32-bit Linux

Various fixes for 32-bit Linux tests.