Use a PHP variable for the user agent in the back end (see #6277 and #3074)