posix and regex fixes for win32

[![](http://toastytech.com/guis/win95boot.png)](https://www.youtube.com/watch?v=1WuC9q_A2Fc)