Replace some cordova-cli uses with cordova-lib