fix for ['HTTP_USER_AGENT'] not being set.

In some cases the server variable 'HTTP_USER_AGENT' is not sent by the client. This was causing some warnings on our production servers.