CommonAPI:iOS: JS fix return of objects for factory methods