Move WPF check before Silverlight.

If the Silverlight (Windows Phone in this case really) check happens
before the WPF one, the WPF can not load any control that checks design
mode because an exception is thrown.
Merge pull request #341 from ChrisWay/FixDesignerDetector

Fix for #339 - Move WPF check before Silverlight.