Would it be ok to encapsulate this within ifdefs? Else you base your code on 5.0, and switching to a newer version may result in a big re-engineering session. Can we put those things into a special Compat class?