In town they don't, but in Wild or Waste they do. For a Village to spawn an Iron Golem it needs a potential of 12 villagers I believe. Haven't looked into it much since 1.8 so could be wrong on the amount, but they still spawn.
While Iron golems do not spawn in town, I guarantee that villages still spawn in iron golems when the conditions are right out in the waste and wild. And indeed, only friendly mobs can be spawned into town. No mobs that can be hostile can be eggified/brought into town, including snow golems and iron golems even if you construct them . ~HL54