Update ean.js

Fixed the way in which the check digit is calculated to allow for the case where the checksum is exactly divisible by 10, to make the check digit 0.  In the previous code the check digit was being returned as 10.