purify ghcjs

This purifies the ghcjs expressions, and makes a small cosmetic change regarding `libDir`.