Fix duplicated define in JavaScript