Do I really need imlib?

No. Terraform uses imlib's JPG read for the about dialog and the PNG and TIFF read as an additional height field formats. Configure should let you compile terraform without imlib. If you run into problems, run

configure --disable-imlib

which will revert back to the default code base which doesn't use imlib.