Allow $ in js function names

This fixes https://github.com/rg3/youtube-dl/issues/2304 for me.  There is a $ symbol in the js function name which is valid javascript.