Made error logging compatible with Internet Explorer (fixes #264)