javascript: Fix more handling of class-related unterminated statements