Make tests and install work with Python 3