Add compatibility for JsonSerializable

Fixes #24 for 5.2/5.3.
Use interface_exists instead of class_exists
Merge pull request #24 from WP-API/jsonserializable

Introduce support for JsonSerializable