Fix 'cabal clean' on Windows for 'build-type: Custom'.

Fixes #1863.