Restore backwards compatible UserAgent API and deprecate it.

*Needs review.*