Rewrote the windows implementation for c++03 rather than c++11.