AFAIK you need to download the source version of the engine.
You do not need to modify the UnrealGame.Target.cs.
I think you need to:
- add your project folder somewhere next to the Unreal “Engine” folder,
- modify the .Target.cs file in your project to add the FORCE_ANSI_ALLOCATOR=1 settings
- regenerate the project files so that your project is added in the solution
- Open solution in Visual and build your project