Effects of a magnetic field gradient on the lower hydrid drift instability