Update MessageLoopWorker.cs

Copied from: http://stackoverflow.com/a/19737374/1768303