Fixed autotools for multiple python versions

Now it should work everything fine even if a distro has python 2 and 3 installed