Remove json_compat code and ensure 5.3 compat.