Small fixes for windows

Windows now builds after nomis52's changes.