make c extension python3 compatible