add_extension now compatible with 3.1