Bird/mammal similarities would be inferred to be inherited from the common-ancestor of birds and mammals, in this case, synapsids.
The Mammary Gland and Its Origin During Synapsid Evolution
"
...Mammary patch secretions were coopted to provide nutrients to hatchlings, but some constituents including lactose may have been secreted by ancestral apocrine-like glands in early synapsids."
http://link.springer.com/article/10.1023/A:1022896515287
This paper already discusses the hypothesis that function related to mammary-gland precursors originated in early synapsid lineages. Therefore if genes involved in mammary gland expression were also found in birds, it would be said that the gene was present in synapsids and inherited in both lineages leading to mammals and birds. It may be argued that the gene was coopted for another use in the diapsid/dinosaur/bird lineage which is why it was conserved.
This would be easily accommodated by Evolution.