Support imenu

Yeah I tried that and it seemed to cause some problems in other modes. It may just have been an intermittent thing, but the problem went away when I started setting it this way.