fixes to build on linux 64bit