Changed the checkCompatibility function according to raphael js documentation