science/dalton: Fix build with GCC8
Backport the upstream patch that fixed the issue.
PR: 232959 Reported by: gerald