makefile: fix ccache & make it work with mingw/msys
Created originally on Bitbucket by Marsu42
Was already merged in Bitbucket before import, marked as merged by the import user
... win32 needs the full cc filename w/ .exe & the $ld mustn't be prefixed w/ ccache or it'll try to call "ccache ccache xyz"