Phonegap 3.1 porting of the old janrain plugin