Add VS2010 and VS2012 projects; fix VS compile issues