Make takeScreenshot wait for DecorView as requested by issue-434