Fix build errors and hide a warning

I was trying to use the package for the R provider and I had to do these changes to make it compile. Not sure if that's because we're using .NET 4.0 or for some other reason, but the `Lazy<_>` was required by the compiler.