Added boolval function for older versions of php.