Move definition of XOPEN level to before compiler use.

Because the Solaris's c99(1) compiler refuses to compile code that isn't at
least XPG6.