Add requirements file.
Update compatibility code.

Newer example code from SleekXMPP is written this way.