Ported to thunderbird 24.