Windows compatibility and conditional self-reporting

I know you seem to be revamping things quite a bit on your dev branch, but I figured this could be useful in the mean time (and maybe some of the windows code could be used in your development, should you find that you need it).