Fixed int-conversion for PHP 5.6.0