compatibility to build in mixed python2/3 environments

With this syntax the detection will only work for python2. Is the default python version 3, the build process dies.