Late answer but I had the problem now and solved it now with none of the proposed solutions.
Though I agree with @axiac about conditionally using a trait depending on its existence, I had a similar problem of conditional use of traits (based on other conditions).
class_alias()
is your friend here.