Fix segfault seen on Solaris-11/x86_64