Improved Windows support thanks to Sebastian Schuberth