Changes to make build work with VS 2012