On the linearization of semilinear wave equations