Fix html and text part discovery for older versions of the mail gem.