Changing module bahavior WWW::Mechanize



So I want to fetch some web pages and then grab some image files they
refer to. The images are linked with the standard <img src="... html
tag. WWW::Mechanize is perfect for that, except that the links it
scans for do not include image tags. Hunting in Mechanize.pm I find
the list it uses, which is:

my %urltags = (
a => "href",
area => "href",
frame => "src",
iframe => "src",
);

If I add one line to that, everything works like I want it too:

img => "src",

But I don't really want to modify my copy of Mechanize! My code
won't work on any other installation. Every time I installed a
updated version, I would have to fix it again (well, that would be
seldom, but.)

What to do? Is there a legitimate way to pass that request to
Mechanize?

Oh and, what do I know, I tried the following in my code and I am not
sure why it didn't work:
$WWW::Mechanize::urltags{'img'} = "src";
..
.