Fix loadLibrarySystem on Linux & OS X.
Add support for -XstartOnFirstThread on OS X

The presence of XstartOnFirstThread is detected automatically via the
JAVA_STARTED_ON_FIRST_THREAD_<pid> environment variable. This is now
the default for LWJGL demos, so CGL context locks have been removed.
Add support for EXT_texture_compression_s3tc
Fix compile-templates on Linux & OS X