I added #ifdef VERSION_2_1 ... #endif tags to the code and wrote a class to generate the source code on the basis of these tags.
This is a really dirty hack which I feel really guilty about, but I saw no
other way.
The two api versions are nearly identical, neither of them have been seriously tested so they might change radically and almost equally in the near future.
This would require lots of updates on 2 almost identical source trees.
So I added the tag system, which seems to work OK for now.
When the implementations have stabilized and proven themselves I might split the source tree again.