Update for PhoneGap 2.x.x (tested with 2.7.0)