Some fixes for failing win64 build