Add tern mode for Javascript