PHP C extension for JSON serialization