Fix issues with generate_javascript.py.