You need to check which one of the scripts is Yate using.
To do that, log into Yate's rmanager through telnet (telnet 127.0.0.1 5038) and issue the 'status engine' command. In the sharedpath= parameter you'll see the path from where yate loads nib.js.
You only need to change the one Yate is using. But, if it's the one from /usr/local, please make a back-up in case you re-install YateBTS (it will overwrite it in that case).
You don't need to recompile YateBTS, you just need to restart or re-initialize YateBTS.