Fix py3.3+ compat

cmp has been removed, replace with poor man's approach for now. Fill
refactor later

Signed-off-by: Christoph Kassen <c.kassen@telekom.de>