various fixes for 64bit linux and windows7 environment