Hook setUserAgent too

Refs #825