added json2.js for ios3 and added phonegap detection