Fix build when NET4_0 symbol is defined
Fix build when NET4_0 symbol is defined

The build was broken when the NET4_0 symbol was defined: there was
a typo in a variable name and a couple of using statements were
missing.

304NotModified/le_dotnet,ITNCore/LogEntries,KieranOB/le_dotnet,logentries/le_dotnet,palette-software/le_dotnet