[Chapel Merge] Fix problem compiling with GCC 5

Branch: refs/heads/main
Revision: fc13eac
Author: mppf
Link: Fix problem compiling with GCC 5 by mppf · Pull Request #19586 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19586 from mppf/dyno-fix-gcc-5

Fix problem compiling with GCC 5

Follow-up to PR #19359.

GCC 5 doesn't include std::hash for enum types so we have to
add our own versions for our enum types when they are needed.

Trivial and not reviewed.