Fixed compile issues on Windows 32-bit, and non-unicode