Global instability in the onset of transonic-wing buffet