handle phonegap initialization a bit differently