Merge pull request #6 from nroza/master

preprocessor platform detection and extern decl
change wcwidth detection
fix some compiler warnings
add wcwidth.c for windows