Modify ossl_method_store_add() to handle reference counting