Field line resonances associated with MHD waveguides in the magnetosphere