build: check for solaris and apply a few defines to CFLAGS.