Fix crash in getVisitorId when user-agent is absent from request.