Python 3 compatibility.
Add conditional dependency on importlib for 2.6 compatibility.