Fix errors when building with VS2013