Added lazy initialization for user agent.