change defvar to defconst in compatibility