A few backward compatible fixes

These allow Metasploit to function in the absence of Rails and Bundler

cc @todb-r7 for the backward compatibility decision, and @limhoff-r7 for the module loading changes.