better solution to the memoir's makeindex issue