enable compatibility with phonegap