r10115: improvments for loading on 64-bit systems