Under certain compiler options, the effect of the gtk_*get_type
function call was optimised away. This change fixes that. It
seems that both static and volatile are necessary, in order to
avoid the compiler from complaining and/or optimising the call
away.