Added phonegap support