A few fixes for native and cross x64 compiling