[[ Bug 12822 ]] Fix OSX build errors
Merge remote-tracking branch 'ian/bugfix-12822' into bugfix-12822