MinGW support, closes #1