copied over from Orchard.Modules repository