skip the correct number of tests when JSON or YAML is not installed

t/14_serializer/06_api.t was failing on my box because it was only skipping 3 tests instead of the 5 that where expected to run