Fix typeof(composite) causing compiler errors with DMD head.

With DMD head, typeof(module) is no longer valid (http://d.puremagic.com/issues/show_bug.cgi?id=9081). This causes isAggregateType to fail with a module, so this pull request just adds a check beforehand to ensure typeof(composite) is valid. It in theory shouldn't affect anything because the change was for modules and there's already a check immediately before to see if composite is a module.