The role of F-doping and oxygen vacancies on the superconductivity in SmFeAsO compounds