Fixes #647

Use jQuery not window.jQuery for compatibility mode