Also make it compile on both MinGW and MSVC
Implement strtok_r for Windows
Merge pull request #20 from linquize/setenv

Support both MinGW and MSVC