win32: use target file format when checking if it supports comments

Bug: 10656
Change-Id: Ib74f213630d6d382118c09b3cbf998b28cbc045e
Reviewed-on: https://code.wireshark.org/review/5544
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
(cherry picked from commit 35b1bc5ec61260bc1890a2c991cdb7218946ae1f)
Reviewed-on: https://code.wireshark.org/review/5545