Fix install error if checkplatform.js is run from node.
Fix install error if checkplatform.js is run from node.

- When compiled for electron Node can not require on the node module resulting in an error.
- In the checkplatform.js file we check if electron is defined or not and only run if electron is available.

xamarin/WebSharp,xamarin/WebSharp,xamarin/WebSharp,xamarin/WebSharp,xamarin/WebSharp,xamarin/WebSharp