add rpath back for library build

this broke library usage completely when it was removed
Merge pull request #3106 from zmike/librarian

add rpath back for library build