fix a few bugs from last dynamic linking build system commit

some cruft was left and DESTDIR was not being used correctly.
1 file changed