Fix memory leak when setting the default USERAGENT