add phonegap support