I’ll check the fix on macOS 10.13 or lower but I prefer not to touch working code :), so decided to limit the fix impact to only 10.14
The problem with such changes is that nobody will drop the OS-check, because of the same reason, and it will be there forever. I suggest to recheck it on 10.13 and drop the OS-check if it works properly.
-- Best regards, Sergey.