fix syntaxerror in python2.4
Merge pull request #4 from stdweird/typeerror_shared

fix syntaxerror in python2.4