Modify build scripts to work for vs2012 and vs2010