Fix `SERVER_PORT` JSON encoding failure by schlessera · Pull Request #5417 · wp-cli/wp-cli

A Travis failure was introduced somewhere in the WordPress Core 5.5 development cycle where the $_SERVER superglobal treats the server port as an actual number, not a string.

This broke one of our Travis tests: https://travis-ci.org/github/wp-cli/automated-tests/jobs/705037602#L1019-L1026

This PR differentiates between WP versions to support both interpretations.