Safely rename JS variables