I got this working now.
I printed $@ to display the error returned from stringFT(). It said this:
libgd was not built with FreeType font support
What I ended up doing was using ActivePerl 5.8.0.806 (ActivePerl-5.8.0.806-MSWin32-x86.msi). I downloaded it from oldapps.com. It did not have GD installed, so from the Windows command prompt I ran:
ppm install http://theoryx5.uwinnipeg.ca/ppms/GD.ppd
this installed GD Version 2.35
There are probably other websites to find GD.ppd, but I found instructions from here:
http://www.hamweather.com/kb/index.php?article=22
Now it works. I am not sure if this will work with the current latest version, 5.10, because 5.10 comes with GD. I don't know if you can simply replace the old one with a new one.