Fix crash of converting ccacceleration to jsval.