add_extension now compatible with 3.1

Deprecated issue solved