Fixed python linking. Made it generic. Shouldnt work on Python3 atm