Update for windows - fixup use of 32 bit longs on windows - switch to long long as guaranteed 64 bit to prevent overflow