fix https://github.com/oauth-io/oauth-phonegap/issues/20