Bug 1065025 - Make the generated WebIDL ToJSON method const; r=baku