I'm not a evolutionary biologist by any stretch, but there are some theories I've heard around this. There are cultures where there are long-established third genders. These are not exactly the same as homosexuality by our definition, but it works reasonably well as an existing, parallel example. For example, here's an interesting article by the BBC on the Fa'afafine of Samoa: http://www.bbc.com/news/world-asia-37227803
The point here is that while these non-reproducing members of a society don't replicate their own genes, by nurturing and supporting their families' offspring they give those offspring a better chance of survival. Considering that these are often the children of their siblings or other relatives, they do--in the end--support the furthering of their families' genes, of which they share a large part.
If this theory holds water, then I'd argue that homophobia is not particularly a natural side-effect of evolution.