Use correct compiler flag when using Solaris Studio.

Also, allow compiler flag to be set for older/newer versions of Solaris.

Admittedly, it is a bit of a preemtive strike for later versions.