godoc: if there is no search box, don't run the respective JS code
godoc: if there is no search box, don't run the respective JS code

Fixes a JS crash which prevented the automatically generated
table of contents to not appear.

R=adg, bradfitz
CC=golang-dev
http://codereview.appspot.com/4460041

rdp/rogerpack2005-golang,sanjosh/sanjos100-tipc,bryanxu/go-zh,mhennings/marcohennings-go,rflanagan/reginaldflanagan-project1,scirelli/scirelli-go,webfd/go-zh,sanjosh/sanjos100-tipc,scirelli/scirelli-go,sanjosh/sanjos100-tipc,bryanxu/go-zh,glycerine/jeaten-go-arrayof-structof,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,npe9/noahevans-go9,d0f/go-zh,scirelli/scirelli-go,rdp/rogerpack2005-golang,mhennings/marcohennings-go,Triskite/willstone-goclone,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,Triskite/willstone-goclone,rflanagan/reginaldflanagan-project1,bryanxu/go-zh,d0f/go-zh,Triskite/willstone-goclone,sanjosh/sanjos100-tipc,bryanxu/go-zh,rdp/rogerpack2005-golang,d0f/go-zh,rdp/rogerpack2005-golang,rdp/rogerpack2005-golang,npe9/noahevans-go9,scirelli/scirelli-go,npe9/noahevans-go9,Triskite/willstone-goclone,d0f/go-zh,npe9/noahevans-go9,webfd/go-zh,scirelli/scirelli-go,bryanxu/go-zh,Triskite/willstone-goclone,rdp/rogerpack2005-golang,scirelli/scirelli-go,webfd/go-zh,Triskite/willstone-goclone,bryanxu/go-zh,webfd/go-zh,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,npe9/noahevans-go9,mhennings/marcohennings-go,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,npe9/noahevans-go9,d0f/go-zh,webfd/go-zh,mhennings/marcohennings-go,d0f/go-zh,Triskite/willstone-goclone,rdp/rogerpack2005-golang,glycerine/jeaten-go-arrayof-structof,rflanagan/reginaldflanagan-project1,rflanagan/reginaldflanagan-project1,scirelli/scirelli-go,bryanxu/go-zh,Triskite/willstone-goclone,npe9/noahevans-go9,mhennings/marcohennings-go,scirelli/scirelli-go,npe9/noahevans-go9,webfd/go-zh,d0f/go-zh,d0f/go-zh,rflanagan/reginaldflanagan-project1,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,rflanagan/reginaldflanagan-project1,rdp/rogerpack2005-golang,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,bryanxu/go-zh,glycerine/jeaten-go-arrayof-structof