Work around IE bug related to relatedTarget