Revert "Revert "Better fix for comparing classes + Use global references to jclass instances used on a global scope.""

This reverts commit cd2a5535cbe067997e190c896abedbc2d8b2540b.
Improved ICS compatability