Add malloc stub and wcwidth function
Merge branch 'mingw' into travis-integration