Workaround for exception thrown when sending messages in WinRT apps.