pdf2svg: make sure cairo is installed before poppler

pdf2svg has:

  depends_on 'poppler' => 'with-glib'

poppler has:

  depends_on 'glib' => :optional
  depends_on 'cairo' if build.with? 'glib'

A clean "brew install pdf2svg" will fail due to the language-level
conditional used to define the cairo dependency.

Since we don't yet have a way to express this in the DSL, this patch
will have to do for now.

Fixes #26205, kinda.