Clean up exported varyings and add support for querying program count from C/C++