Fix Javascript generator to use %renamed variable names.