Use binary search for getting optimal length

This provides some performance improvements over using a linear search.
Quote keywords and dictionary accesses

The "char" bareword causes issues with some JS compressors including
yui-compressor and shrinksafe.

Fixes: #1
Update files in dist/