Influence of longitudinal magnetic field on thermomagnetic instabilities in a.c. superconducting cables