Fixed compile and linking under mingw environment
Merge pull request #221 from mmicko/master

Fixed compile and linking under mingw environment