Fixes #8. Handles navigator.connection.type bug in cordova 2.2