JSON API: use self instead of $this

It caused mulitple syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM errors on sites running PHP 5.2
Merge pull request #1323 from jeherve/fix/json-install-self-php52

JSON API: use self instead of $this