Javascript: set <title> from <h2> tag