Fix build issues and add a new config parameter 'userAgent' to proxy

Maybe this is helpful for others, too.