package/php: Fix static linking by reworking static libs handling
Fixes
http://autobuild.buildroot.net/results/157/
157749f8b44bc02fbed0232a2b33137aba495134/
http://autobuild.buildroot.net/results/df4/
df4e2ea098b0126867455af1891837c6d7d99a92/
http://autobuild.buildroot.net/results/e69/
e6993d66aeebbe994063a60871412b2235ce5455/
[Peter: unixodbc only needs -lpthread if toolchain has threads support]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>