Added workaround for locale bug

See: http://youtrack.jetbrains.com/issue/CPP-170#comment=27-795371