Fix install from read-only obj dir when SHLIB_LDSCRIPT is used.

Reported by:    joeld
Tested by:      joeld