Fixes for loading wrong libpython.so when having multiple python installation.

I have two python installations on my Linux box: one is 2.7.3 (system) and the other is my own compilation of  2.7.5, if LD_LIBRARY_PATH is not set it will show errors about MAXREPEAT when running 2.7.5 executable with 2.7.3 libpython.so .