Fix for Issue #142

Fix for Issue #142
Firefox 26 removed event.initMessageEvent method so this had to be handled.
Using typeof(MessageEvent) to switch two ways to create MessageEvent.