Some basic portability changes, including a Mingw cross compiled build file
Complete the previous commit
Merge branch 'jmobs' of https://github.com/vladpetric/ntest into jmobs