Fixes to work on FF25.

My Firefox 25 disconnects user media in a few seconds.
This code prevents it.