Make load_entitydefs() work on Python 3.