fixed sample build errors in vs2008