Tweaks to silence some compiler warnings on Windows