build: update dtrace m4 check for sunos

The check to see if -G is needed for dtrace requires a bit more effort,
make a header, c file, and object file.