Role of defects on the enhancement of the photocatalytic response of ZnO nanostructures