Add a check if defaultEm is zero, and retry after a delay if it is.  WebKit seems to have this happen sometimes when web fonts are used for the page (though hard to reproduce).  Resolves issue #576.