fix using $this in a static context

Current code produces an error notice. As the method is static get_called_class should be used.
use __CLASS__ instead of get_called_class for php5.2 compatability

get_called_class, whilst alleviating the issue on 5.3 would result in different output to the previous code in situations where the class was extended. 

__CLASS__ returns the classname from the method's own class, ignoring inheritance, which matches existing behaviour.
Merge pull request #85 from bencromwell/master

fix using $this in a static context