VW agrees to safeguard German jobs to quell labor unrest