Fix the mac build for 8f4adda2.

Refs. ticket:4095.
Merge branch 'bugfixes' into 3.1