Use ENGINE_get_id() instead of ENGINE_get_name()