fix previous commit to #4190 so that it builds on Windows