Changes to be able to compile using visual studio 2012