Fix for dependent libraries with static libs.

Static libs need to be linked as 'libThis.a libDependent.so', not
'libDependent.so libThis.a'. The latter will not resolve symbols needed
by libThis from libDependent.