backport some check assert macros for older versions than 9.10 (e.g. for travis)