Fix MinGW build

Nevermind on that last part, I just remembered that Windows uses `codecvt`, which is not yet implemented with GCC (silly GCC) which MinGW uses. Carry on, but you may want to add a comment.