Install an up to date version of libgd on your system, then use

cpan
to build the perl module GD against it. You haven't specified which OS you are on, if it has a package manager you should be able to install it from there:

 sudo pacman -S gd
[sudo] password for marto: 
warning: gd-2.3.3-9 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)  Old Version  New Version  Net Change

extra/gd     2.3.3-9      2.3.3-9        0.00 MiB

Then just reinstall the module using cpan or otherwise. If on windows see instructions at https://github.com/libgd/libgd, or consider using Strawberry perl with all this sort of thing included.