Trapped modes in a waveguide with a long obstacle