Cherry-pick commit from 2.1.1

This commit should have been included when I merged the changes from 2.1.1, but for some reason it was not.

Original commit: https://github.com/SignalR/SignalR/commit/f59827a2651bf14b45e8bfac9676f5310de764ee

Original incomplete merge commit: https://github.com/SignalR/SignalR/commit/1540c08a9bf93fb4988b213726092a0bc9473d6b

As far as I can tell this was the only missing commit.