Update Share.java

Updated codes to work with cordova 2.7 or greater version