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

Fix compilation on Solaris