.NET 4.0 compat fix
Merge branch 'master' into smuxi-master