Allow for dollar symbol in js function name

Fix for gh-344