Change 'int' method to 'toInt' to fix YUI Compressor minification error

When minifying this file with YUI Compressor (https://github.com/yui/yuicompressor) the process failed because use of reserved js word as function name.
I correct the name to pass the minification.