Check whether to set up events for the old search control.

For the old search box control (which will be replaced by the
newer one used in PlantShare soon), check whether the box is
present before setting up events. This fixes console errors
from appearing in partner sites, which do not yet have search
but where the search code is still included. (#396)