Fix sign comparison warning in mg_get_ports

ctx->num_listening_sockets is a signed int. i is a size_t (unsigned long).