fix to configure script on Windows

fixes issues with strange permission failures for writing to a.out
Fix to threaded_loop on Windows/GCC 4.8.2

Closes #98