Dot net 5.4.1 support

Small changes to enable migration to .net 4.5.1