Fix issue with hex colors with leading zeros.

Resolves kangax/fabric.js#815.