simplify imlib2 check