Portability improvements

This PR fixes and adds support for:

* Strawberry perl on Windows (gcc compiler).
* ActiveState perl on Windows (MSVC and gcc compiler).
* Solaris perl (SunPro and gcc compiler)