fixed device os detection in phonegap