Fixed building on Windows, hopefully without breaking anything else.