Make syncDemo work in vanilla cordova project