Compatibility with all phonegap versions

The new script works with every phonegap version