Fix building for vlc 2.1 on windows, minor bugfixes