Added phonegap regid ref to a global variable for async.