Defect calculations in semiconductors through a dielectric-dependent hybrid DFT functional: The case of oxygen vacancies in metal oxides