Fix Windows 64 bit warnings

Replacement for Pull #866