Spanish baker Panrico has secured union backing for cuts to pay and jobs - although its initial plans have been watered down.