opam: fix ymlink support for packages

See OCamlPro/opam#520 for details

Closes #18376.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>