[DF-3966] fix ios compilation, memory issues in pngHelper