Added possible fix for issue ericdrowell/KineticJS#884.