Starting from version 5.5.0 PolyMl uses libFFI for the FFI. It comes bundled with its own internal copy, but also provides the compile switch "--with-system-libffi". As Gentoo has the "don't use bundled libs" policy and upstream supports the unbundling (via the given switch), this should be honored in the ebuild: Depend on virtual/libffi and pass the switch to econf. Or are there are other reasons that speak against this?
Committed the suggested fix, thanks for the report and the fix.