This line you quoted compiles fine for me, and executes fine for me:
boolean original_auto_linecomment = _get_var(find_index('def_auto_linecomment', VAR_TYPE));
This line you quoted might need a #import near the top of the macro file:
// def_auto_linecomment is from box.e, so if the variable can't
// be found, try #import'ing the file and see if that helps.
#import "box.e"
boolean original_auto_linecomment = def_auto_linecomment;
By the way, what version of SE was the macro working in before, and what version of SE are you trying to get it working in?