added fixes for compile on Windows 64-bit