Make compatible with cordova-2.2.0 (issue#2)