added 10.6 support by replacing NSJSONSerialization with JSONKit