Volvo Trucks has struck a deal with unions that will save 335 jobs that had previously been announced as being made redundant.