AWTScreenImageUtil: Workaround for bug in jenkins

There is weird bug in the compiler used by jenkins. If you have
a generic Type T and you test it with instanceof AnotherType,
it will say "inconvertible types".