ImageMagick: add Perl support

Closes #23347.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>