Generalized Morse functions satisfy the h-principle