Only generate Math.__name__ for js if necessary.