Smarter module loading

see https://github.com/ether/etherpad-lite/pull/2350#issuecomment-65665160