[bugfix] tell glibc to use _GNU_SOURCE for locks

This is required for PTHREAD_PRIO_* constants.  If in the future it is
realized that _GNU_SOURCE needs to be defined for various other files,
the definition of _GNU_SOURCE must be moved to command line and enabled
only if compiling against glibc.

Perhaps I should consider moving to autoconf.

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>