I should have come back and marked this resolved, since I just found my own question again on a search. From the evalXPath context, it is necessary to use `ArgsContext` to reference global variables in the script. I.e.:
evalXPath("//a[text()=\"" + ArgsContext.custName + "\"]")
will yield the desired results.