YUI - check to see if reference to loader has getModuleInfo before attempting to call the method.

With little context, a potential fix for #1758.
This is just a strawman pull request as there may be a larger underlying issue of which I'm not aware.