There is also a GTK2.version(), that returns the versions, but you probably can't use that either.
No, and also, GTK2.version() returns the runtime version of the libraries, which may be different. If you have GTK 2.12 when you build pike, features which "require gtk214" will not be compiled in. If you then upgrade the libraries (which are dynamic) to 2.14, GTK2.version() will return 2.14, but the gtk214 stuff will still not be available as it wasn't compiled into pike.