It might be better to move this to backwardcompat and just import match_hostname from there.