Fix mingw build

Here is a patch to fix #74 without changing Discount code.

Define type macros only if those are not defined.
DWORD, WORD and BYTE may be defined on Windows.