Role of oxygen vacancies in resistive switching in Pt/Nb-doped SrTiO3