Some fixes for Win64 build