Fix use of module .def files for MS tools
We recognize .def source files and map them to the /DEF:<file> option in the MSVC tools. Previously this worked only for shared libraries. This commit cleans up the implementation and makes it work for executables too. See issue #9613.