Merge 'runrevfraser/bugfix-13580' (#1380) into feature-stackdir.

Needed to fix building on non-Ubuntu x86-64 Linux systems.