ghc-pkg: Munge dynamic library directories
ghc-pkg: Munge dynamic library directories

Otherwise we end up looking in the wrong place for dynamic libraries on
Windows. This addresses a regression introduced by D2611. See #12479.

Test Plan: validate across platforms

Reviewers: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2640

GHC Trac Issues: #12479

(cherry picked from commit 75e69edb498511cf2b28dec4e14e6d11232f3e32)

GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc