Fix detection of python linker flags python-config has both --libs and --ldflags, and we should use the later to link the python binding