Add type definition to EventSource constructor.

This change helps out users who compile their code with the --noImplicitAny flag.