Fix compilation error on Solaris

Fixes #1167