glib2: using "-Werror" to check whether it can use compiler option

In recent OSX, default compiler of Command Line Tools 4.0 or higher is clang.
So, '-Wout-of-line-declaration' causes flood of warnings as follows:

```
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you
mean
      '-Wout-of-line-declaration'? [-Wunknown-warning-option]
```