Issue #4580: Fix CONSTANTS inconsistence between h5 and JSB