Fixes for building on 32 and 64 bit Linux