D: Fix rpath handling on Linux, OS X