py3: Fix html-related imports on Python 3