Fix bug; don't access r->useragen_ip when request_rec is NULL