final fixes for win32, and a new contrib script to help building it