correct formatting for generating VIAF uri; use VIAF uri if we have one [Fixes #39083011 and #39083303]