Make sure your .NET compatibility is set to 4.0 for both editor and runtime, in the Unity project settings (under "Player").
I was banging my head against a wall trying to solve, not this exact problem, but one very similar, and I finally discovered this was the cause. I had upgraded the project from an earlier version of Unity and didn't realize it was still set to .NET 3.5.