Normalize line endings
Remove ridiculous code duplication and string comparisons

Includes update to libjitsi/b2f593c7b3ac683a92369609b17d820ad42762ca