[YoutubeDL._calc_cookies] Restore the 'has_header' method