Fix 'Uncaught ReferenceError: jQuery is not defined' if jQuery is not included in template.
Merge pull request #3079 from timsnadden/3.1

Fix 'Uncaught ReferenceError: jQuery is not defined'