Fix compilation on Solaris
Merge pull request #2198 from dmcdougall/fix_solaris_compile

Fix compilation on Solaris
Merge remote-tracking branch 'upstream/v1.2.x' into v1.3.x