OCaml 5 Regex Import Error

I’m doing the Acronym exercise in OCaml, and I’m taking advantage of the Str regex library to complete it. My code is pretty short:

open Str

let acronym phrase =
    phrase
    |> String.uppercase_ascii
    |> Str.global_replace (Str.regexp {|[^A-Za-z \-]|}) ""
    |> Str.split (Str.regexp {|[ \-]|})
    |> List.map (fun word -> String.sub word 0 1)
    |> List.fold_left (^) ""

I’m getting the following error:

File "_none_", line 1:
Alert ocaml_deprecated_auto_include: 
OCaml's lib directory layout changed in 5.0. The str subdirectory has been
automatically added to the search path, but you should add -I +str to the
command-line to silence this alert (e.g. by adding str to the list of
libraries in your dune file, or adding use_str to your _tags file for
ocamlbuild, or using -package str for ocamlfind).

File "acronym.ml", line 1, characters 0-8:
1 | open Str
    ^^^^^^^^
Warning 33 [unused-open]: unused open Str.
File "_none_", line 1:
Error: No implementations provided for the following modules:
         Str referenced from .test.eobjs/native/acronym.cmx
make: *** [Makefile:4: test] Error 1

It seems that OCaml was upgraded without the change to the Str library being accounted for. For reference, I ran

utop -I +str str.cma

using utop version 2.14.0 and OCaml 5.1.1, and plugged in some of the test cases after importing Str and entering in the function, which gave the correct outputs.