be more defensive about the reference to jQuery

We cannot assume that if jQuery is already loaded, that this dollar sign is defined.