Generate def file when building with MingW32

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>