Fix incompatible pointer types warning on Solaris with gcc 6.4