fix for python2.6

Sorry about that, thought that if I reopened the branch and pushed to that one, it would automatically be appended to the previous merge request. But it was already closed for good it looks like..

Anyway, if you find any better solution let me know. I tried to search the issue but could not find anything on the topic. This is probably the reason why I imported from distutils in the first place (but had since forgotten, I need to write more comments!)