Fixing redraw api viewer function. See https://github.com/documentcloud/document-viewer/issues/45