[pbc_to_exe] add mt.exe check on mingw

Fixes some parts of #1157.
[codingstd] Variable declared in conditional in capture

#892