The evolution of sex pheromones in an ecologically diverse genus of flies