Fix warnings with PTHREAD_ONCE_INIT on Solaris.

On Solaris PTHREAD_ONCE_INIT needs to be in braces. This changes
adds a configure check to test if this is needed and add it where
appropriate. Do the same for PTHREAD_MUTEX_INITIALIZER.

This change is derived from: (as it is of today's date)

http://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob_plain;f=configure.ac;hb=HEAD
Merge branch 'jens-mega-patch' of github.com:tdb/libstatgrab into jens-mega-patch