Fixed 2010 Compatibility and XE2 up compiler err

Fixed issue with IoC generics which mean incorrect compiled code under
Delphi 2010. This means the API isn't fully supported under 2010 however
at least it now compilers and tests work.