use forEach in extensions iteration in gl code; fixes #2514