Makes it work in Phonegap