Fix Windows build and update it for VS 2013.