fix mbstring shim on edge case