Implement net 4.5.1 generic wrapper methods in Marshal.