Possible solution would be to update agg code, agg version 2.6.1 has many improvements, also uses permissive license.
This link has agg-2.6.1.tar.gz version: Releases · aggeom/agg-2.6 · GitHub
Here the reasons for creating the agg-2.6.1 version: https://github.com/conan-io/conan-center-index/pull/16865
Debian project uses agg version 2.6.1, explanation in link: https://metadata.ftp-master.debian.org/changelogs//main/a/agg/agg_2.6.1-r134+dfsg1-2_changelog