Work around some issues with jQuery + IE