Problem: strndup is not available on all system
Solution: revert to previous duplication code
Problem: mingw32 is relying as well on the typedef for int[32|64]/uint[32|64]
Solution: add them for mingw build as well
Merge pull request #829 from sappo/master

Problem: strndup is not available on all system