Fix boolval is only available in PHP5.5