Add a workaround for PHPs inconsistent handling of boolean values.

(string)$value casts a true value to "1", but casts a false value to ""
such that the array_key_exists() call will always return false when
looking up the false value which is keyed in the array as "0".

By first casting boolean values to integers we cause (string)$value to
generate the correct string representations of "0" and "1".
Merge pull request #494 from youngest/renderCell-boolean-fix

Add a workaround for PHPs inconsistent handling of boolean values.