domains: properly check if domains are being used

process.domain is almost never just undefined, so it was setting the
object property unnecessarily.