Correspondence of defect energy levels in hybrid density functional theory and many-body perturbation theory