Fix for breaking JS test in poltergeist