Added compatibility with VS2012