Fix bug when a Javascript function is called define but has nothing to do with Require