reorder libraries and add ws2_32 for MinGW
Merge pull request #4 from alex85k/mingw

Support MinGW compiler