Tweaks to make things compile on Windows