Added v4 vs v5 support for the ConfigureMapping code that gets generated.