Switch to .NET 4.0.

So @niksedk, check out this branch, do your tests and let me know. So far, it works fine on my OS (8.1 x64). Would be nice to try on XP too.