Backwards compatibility with BeautifulSoup 3