scanner: Don't barf on anonymous unions

I'd like to be able to use this inside GTK+.

See: https://bugzilla.gnome.org/show_bug.cgi?id=711153

https://bugzilla.gnome.org/show_bug.cgi?id=711157