compilation fixes for VS2012 x64.