Allow algorithm names to be upper- or lower-case

The standard doesn't seem to specify whether algorithm names must be
capitalized or lower-case.  I had an issue with spurious failures due to
a lower-case algorithm name ("hs256"), so here is a patch that converts
the incoming name to capital letters before looking it up in the
algorithm dictionary.