Fix javascript error when running on Cordova iOS

It seems that 'device' is not always available, not even after the
device_ready event. The check in Private.isCordovaAndroid does attempt to provide for that situation,
however it produces a javascript error.
Using a more reliable method to check if it is an Android device does
yield consistent results.