Support for Gnome Shell 3.6 & 3.8

Hi nodefortytwo,
Here is a small update to metadata.json only to support Gnome Shell 3.6 (Ubuntu 12.10 for example) and 3.8.
I should have fixed also the undeclared variable warning issue.