resolve mime-types based on ruby version

Rather than do a straight version update of the dependencies, do an (admittedly hacky) check for the ruby version and install the appropriate version. This should give people more time before needing to upgrade their ruby/update `mail` to 3.0, while allowing others to resolve to the newer version.