Fix dependency generation when GhcLibWays = dyn p