Some tweaks to make things compile on 64 bit hosts