hercules: patch for OS X

Closes #24910.