windows fixes and more

Please also consider to patch the sundown lib sources as here https://gist.github.com/weltling/6606099 . I've just built the latest sundown ext release using these patches, you can fetch it here http://windows.php.net/downloads/pecl/releases/sundown/0.3.8/ and see the build logs.