Update legacy.js

Allow e.g. require-debug.js to work in findBase
Merge pull request #234 from htInEdin/patch-1

Update legacy.js