Small additions to support being used in youtube-dl extensions