In case anyone is trying to use this as part of a template, you just have to add
// recursive parse in case we are inside a template if($wgVersion >='1.16') { foreach($args as &$arg) { $arg = $parser->recursiveTagParse( $arg, $frame ); } }
just above
... // retrieve URL of image file substituting GeoGebra applet if Java ist not installed ...