add Bidi support to isLeftToRight function

add Bidi support to isLeftToRight function

see https://bugs.dojotoolkit.org/ticket/17721