Fix javascript error when running on Cordova iOS

It seems that 'device' is not defined when using Cordova on iOS. The check in
Private.isCordovaAndroid does attempt to provide for that situation,
however it produces a javascript error. Checking with typeof yields the
proper result on both Android and iOS.