Scattering of a Klein-Gordon particle by a smooth barrier