update for PhoneGap >= 3.0