Fix windows build
Edits to build on VS2013