Improve error logging by including the stack-trace if available.
Fix iframe initialization on IE11.
Prevent exceptions on IE when document.selection is null.