Use $_SERVER count to compare environment variables in tests

Fixes reactphp/react#302