python: obey LDFLAGS

(From Poky rev: adb3d77dd088392a25cdfd50736ded4933ba4ee5)
These changes are already merged upstream and are added
just for async release.

JIRA: http://jira.alm.mentorg.com:8080/browse/SB-3923

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Yasir-Khan <yasir_khan@mentor.com>