Compatibility with all phonegap versions

Fixed compatibilty changes under phonegap plugin specifications.