Something we should perhaps move into ejtp.util.compat?